package pattern7.testpaper;

/**
 * @author wdl
 */
public abstract class TestPaper {
    public final void testQuestion1() {
        System.out.println("测试题目1，请填写答案");
        System.out.println("答案：" + answer1());
    }

    /**
     * 第一题答案通过抽象方法来使得学生回答问题即可
     *
     * @return 返回第一题答案
     */
     protected  abstract String answer1();

    public final void testQuestion2() {
        System.out.println("测试题目2，请填写答案");
        System.out.println("答案：" + answer2());
    }

    protected abstract String answer2();

    public final void testQuestion3() {
        System.out.println("测试题目3，请填写答案");
        System.out.println("答案：" + answer3());
    }

    protected abstract String answer3();
}
